<template>
	<view>
		<view style="height: 35px;"></view>
		<uni-icons type="closeempty" size="30" class="icon" @click="backMine"></uni-icons>
		<view class="loginHead">
			<view class="" @click="loginTyoe(1)" :class="defIndex == 1 ? 'headClick' : ''">
				账号密码登录
			</view>
			<view class="" @click="loginTyoe(0)" :class="defIndex == 0 ? 'headClick' : ''">
				手机快捷登录
			</view>
		</view>
		<view v-if="defIndex == 0">
			<loginNum />
		</view>
		<view class="" v-else>
			<loginName></loginName>
		</view>
		<!-- <aaa></aaa> -->
	</view>
</template>

<script>
	import uniIcons from "@/components/uni-icons/uni-icons.vue";
	import loginNum from "./components/loginNum.vue";
	import loginName from "./components/loginName.vue";
	export default {
		components: {
			uniIcons,
			loginNum,
			loginName
		},
		data() {
			return {
				defIndex: 1,
			}
		},
		methods: {
			backMine() {
				uni.navigateTo({
					url: "/pages/guide/guide"
				})
			},
			loginTyoe(num) {
				this.defIndex = num;
			}
		}
	}
</script>

<style>
.icon {
	float: right;
	margin-top: 20rpx;
	margin-right: 20rpx;
	color: #989898 !important;
}
.loginHead {
	display: flex;
	justify-content: center;
	position: absolute;
	top: 240rpx;
	left: 0;
	right: 0;
	height: 60rpx;
}
.loginHead > view {
	margin-left: 40rpx;
	margin-right: 40rpx;
}
.headClick {
	color: #FED501;
	border-bottom: 2rpx solid #FED501;
}
</style>
